from PyPDF2 import PdfFileReader, PdfFileWriter

old_file = PdfFileReader('python介绍.pdf')
new_file = PdfFileWriter()
watermark = PdfFileReader('watermark.pdf').getPage(0)

for pageNum in range(old_file.numPages):
    page = old_file.getPage(pageNum)
    page.mergePage(watermark)
    new_file.addPage(page)

with open('python介绍2.pdf', 'wb') as f:
    new_file.write(f)

